package org.example.sb_20241005springboot.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.sb_20241005springboot.model.MessageInfo;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:做渐进主义的改良派,不做完没注意的速成派
 * User: XALEXC
 * Date: 2025-02-21
 * Time: 21:38
 */
@Mapper
public interface MessageMapper {

    @Insert("insert into message_info(`from`,`to`,`message`) values (#{from},#{to},#{message})")
    public void insertMessage(MessageInfo messageInfo);
    @Select("select * from message_info where delete_flag=0")
    public List<MessageInfo> selectAllMessage();
}
